package com.utils

import java.util.{Date, Locale}

import org.apache.commons.lang3.time.FastDateFormat

/**
  * 日期时间解析工具类:
  * 注意：SimpleDateFormat是线程不安全
  * val YYYYMMDDHHMM_TIME_FORMAT = new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss Z", Locale.ENGLISH)
  */
object DateUtils {


  /**
    * 获取时间格式：yyyy-MM-dd HH:mm:ss
    */
  val TARGET_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss")

  def getCurrentTime() = {
    TARGET_FORMAT.format(new Date())
  }


  def main(args: Array[String]): Unit = {
    println(getCurrentTime())
    val a = (1,3,4,5,(1,3,(2,6)))
    println(a._5._3._2)
  }



}
